package com.chain;

/**
 * @author zhangyan
 * @version $ Id: Ratify.java, v 0.1 2021/6/30 23:18 zhangyan Exp $
 */
public interface Ratify {

    /**
     * 处理请求
     *
     * @param chain
     * @return
     */
    Result deal(Chain chain);

    /**
     * 接口描述：对request和Result封装，用来转发
     */
    interface Chain {
        // 获取当前request
        Request request();

        // 转发request
        Result proceed(Request request);
    }
}
